# Maintainer: kez cleal <clealk@cardiff.ac.uk>

_realname=gw
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.8.2
pkgrel=1
pkgdesc="A genome browser for bam/cram and vcf files (mingw-w64)"
arch=(any)
mingw_arch=('ucrt64' 'clang64')
url="https://github.com/kcleal/gw"
license=('spdx:MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
             "${MINGW_PACKAGE_PREFIX}-skia"
)
depends=("${MINGW_PACKAGE_PREFIX}-htslib"
         "${MINGW_PACKAGE_PREFIX}-glfw"
         "${MINGW_PACKAGE_PREFIX}-libwebp"
         "${MINGW_PACKAGE_PREFIX}-freeglut"
         "${MINGW_PACKAGE_PREFIX}-glew"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-fontconfig"
         "${MINGW_PACKAGE_PREFIX}-dlfcn"
         "${MINGW_PACKAGE_PREFIX}-libpng" )
source=(https://github.com/kcleal/${_realname}/archive/refs/tags/v${pkgver}.tar.gz)
sha256sums=('519f06fac2635a59614517ff00dc1e86e4f78c2926df504b03ba62a66a5de3e8')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
    cd ${_realname}-${pkgver}
    make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  install -D -m755 gw.exe "${pkgdir}${MINGW_PREFIX}/bin/gw.exe"
  install -D -m644 .gw.ini "${pkgdir}${MINGW_PREFIX}/bin/.gw.ini"
}
